import 'package:flutter/material.dart';
import 'package:flutter_base_widget/base/base.dart';

class BottomSheetPage extends BasePage {
  @override
  Widget rebuild(BuildContext context) {
    return Container(
      alignment: Alignment.center,
      child: RaisedButton(
        child: Text("点击按钮"),
        onPressed: () => _onButtonPressed(context),
      ),
    );
  }

  void _onButtonPressed(BuildContext context) {
    showModalBottomSheet(
      context: context,
      builder: (context) {
        return Container(
          height: 100,
          child: Column(
            children: <Widget>[
              ListTile(
                leading: Icon(Icons.ac_unit),
                title: Text("Cooling"),
              )
            ],
          ),
        );
      }
    );
  }
}

